#define  _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
    int n = 0;
    double frr[100] = { 0 };
    scanf("%d", &n);
    for (int i = 0; i < n; i++)
    {
        scanf("%lf", frr + i);
    }

    for (int i = 0; i < n - 1; i++)
    {
        for (int j = 0; j < n - 1; j++)
        {
            if (frr[j] > frr[j + 1])
            {
                double tmp = frr[j];
                frr[j] = frr[j + 1];
                frr[j + 1] = tmp;
            }
        }
    }

    double sum = 0;
    for (int i = 0; i < n; i++)
    {
        sum += frr[i];
    }
    printf("%.2lf %.2lf %.2lf\n", frr[n - 1], frr[0], sum / n);



    return 0;
}